﻿using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Xc.DataAccess.Core;
using Xc.DataAccess.Protocoals.WaterMeters.Models;
using Xc.DataAccess.Protocoals.WaterMeters.Models.Requests;

namespace Xc.DataAccess.WaterMeters.ClientSides.Services
{
    public interface IWaterDeviceSendService
    {
        string ServerPath { get; set; }

        Task<Result> GetMeterAddress(string deviceId);
        Task<Result> GetMeterData(string deviceId);
        Task<ResultData<OnlineDevice>> Onlines(string devcieidLike = null, int skip = 0, int take = 1000, ShowInvalidateDevcie showInvalidateDevcie = ShowInvalidateDevcie.Hide);
        /// <summary>
        /// 发起请求
        /// </summary>
        /// <typeparam name="TSend"></typeparam>
        /// <param name="send">要发送的内容</param>
        /// <param name="name">命令名称</param>
        /// <returns></returns>
        Task<Result> RequestCore<TSend>(TSend send, [CallerMemberName] string name = null);
        Task<Result> SetAlarmVolume(SetAlarmVolumeRequest setAlarmVolumeRequest);
        Task<Result> SetCloseValve(SetCloseValveRequest setCloseValveRequest);
        Task<Result> SetMeterIpAddress(SetMeterIpAddressRequest setMeterIpAddressRequest);
        Task<Result> SetMeterMutipleCharge(SetMeterMutipleChargeRequest setMeterMutipleChargeRequest);
        Task<Result> SetMeterUploadInterval(SetMeterUploadIntervalRequest setMeterUploadIntervalRequest);
        Task<Result> SetMeterValue(SetMeterValueRequest setMeterValueRequest);
        Task<Result> SetOpenValve(SetOpenValveRequest setOpenValveRequest);
        Task<Result> SetRestoreFactory(string deviceid);
        Task<Result> SetUserChange(SetUserChangeRequest setUserChangeRequest);
    }
}